#!/usr/bin/env python

import gtk
import sqlite3
import datetime as dt

class DB:
	pass

class WorkTimeWindow(gtk.Window):
	def __init__(self, parent=None):
		gtk.Window.__init__(self)
		try:
			self.set_screen(parent.get_screen())
		except AttributeError:
			self.connect('destroy', lambda *w: gtk.main_quit())
	
		# size and name
		self.set_title("WorkTime 0.1")
		self.set_default_size(650,536)
		
		# window area
		window_area = gtk.Fixed()
		self.add(window_area)

		# frames
		frame_timer = gtk.Frame(" Timer ")
		frame_tcalc = gtk.Frame(" Time Calculator ")
		frame_timer.set_size_request(640,50)
		frame_tcalc.set_size_request(640,50)
		window_area.put(frame_timer,5,5)
		window_area.put(frame_tcalc,5,60)

		# frames areas
		timer_area = gtk.Fixed()
		frame_timer.add(timer_area)
		tcalc_area = gtk.Fixed()
		frame_tcalc.add(tcalc_area)

		# widgets for for frame timer
		hr_entry = gtk.Entry()
		hr_entry.set_text("00")
		hr_entry.set_max_length(2)
		hr_entry.set_width_chars(2)

		time_laber = gtk.Label(":")

		mn_entry = gtk.Entry()
		mn_entry.set_text("00")
		mn_entry.set_max_length(2)
		mn_entry.set_width_chars(2)
		
		insert_button = gtk.Button(" Insert Date ")

		timer_area.put(hr_entry   ,5 ,5 )
		timer_area.put(time_laber ,30,10)
		timer_area.put(mn_entry   ,35,5 )

		# entries for frame timer calculator
		pass
	
		# let's show all
		self.show_all()

def main():
	mw = WorkTimeWindow()
	gtk.main()

if __name__ == '__main__':
	main()
